<?php
$cs = Yii::app()->clientScript;
$cs->scriptMap = array(
    "jquery.js" => false
);
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta charset="UTF-8" />
        <meta name="language" content="es" />

        <style type="text/css" media="all">
            @import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/style.css");
            /*@import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/custom.css");*/
            @import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/jquery.wysiwyg.css");
            @import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/facebox.css");
            @import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/visualize.css");
            @import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/date_input.css");

        </style>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/rbac.css" />
        <link rel="stylesheet/less" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/custom.less"/>


        <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=7" /><![endif]-->
        <!--[if lt IE 8]><style type="text/css" media="all">@import url("<?php echo Yii::app()->theme->baseUrl; ?>/css/ie.css");</style><![endif]-->

        <!--[if IE]><script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/excanvas.js"></script><![endif]-->

        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.img.preload.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.filestyle.mini.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.wysiwyg.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.date_input.pack.js"></script>

        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/facebox.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.visualize.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.select_skin.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/ajaxupload.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.pngfix.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/custom.js"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/less-1.0.41.min.js"></script>


        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>

    <body>

        <div id="hld">

            <div class="wrapper">		<!-- wrapper begins -->

                <div id="header">
                    <div class="hdrl"></div>
                    <div class="hdrr"></div>
                    <h1><a href="#">Administracion</a></h1>

                    <?php
                    $this->widget('zii.widgets.CMenu', array(
                        'id' => 'nav',
                        'items' => array(
                            array('label' => 'Escritorio', 'url' => array('/site/index'),'items'=> array(
                                array('label' => 'Contacto', 'url' => array('/site/contact', 'view' => 'about')),
                                array('label' => 'Acerca de', 'url' => array('/site/page', 'view' => 'about')),
                            )),
                            
                            array('label' => 'Productos', 'url' => array('/producto/admin'), 'items' => array(
                                    //array('label' => 'Administrar', 'url' => array('/producto/admin')),
                                    array('label' => 'Nuevo', 'url' => array('/producto/create')),
                            )),
                            array('label' => 'Categoria', 'url' => array('/categoria/admin'), 'items' => array(
                                    //array('label' => 'Administrar', 'url' => array('/categoria/admin')),
                                    array('label' => 'Nueva', 'url' => array('/categoria/create'))
                            )),
                            array('label' => 'Agencias', 'url' => array('/agencia'))
                        ),
                    ));
                    ?>
                    <p class="user">
                        <?php if (Yii::app()->user->isGuest): ?>
                        <?php echo Chtml::link("Entrar", Yii::app()->getModule('user')->loginUrl); ?>

                        <?php else: ?>
                                Hola, <?php echo Chtml::link(Yii::app()->getModule('user')->user()->profile->firstname, Yii::app()->getModule('user')->profileUrl); ?> |
                        <?php echo Chtml::link("Salir", Yii::app()->getModule('user')->logoutUrl); ?>
                        <?php endif; ?>
                            </p>
                            <!--<p class="user">Hello, <a href="#">John</a> | <a href="index.html">Logout</a></p>-->

                        </div>		<!-- #header ends -->
                <?php
                                $this->widget('zii.widgets.CBreadcrumbs', array(
                                    'links' => $this->breadcrumbs,
                                    'homeLink' => CHtml::link('Principal', Yii::app()->homeUrl),
                                )); ?><!-- breadcrumbs -->
                <?php if ($this->generarBloque): ?>
                                    <div class="block">

                                        <div class="block_head">
                                            <div class="bheadl"></div>
                                            <div class="bheadr"></div>

                                            <h2><?php echo CHtml::encode($this->subtitulo); ?></h2>

                                            <ul class="tabs">


                                            </ul>
                                        </div>		<!-- .block_head ends -->



                                        <div class="block_content" >
                        <?php
                                    $this->widget('zii.widgets.CMenu', array(
                                        'items' => $this->menu,
                                        'htmlOptions' => array('class' => 'actions'),
                                    ));
                        ?>
                        <?php echo $content; ?>
                                </div>
                                <div class="bendr"></div>
                                <div class="bendl"></div>
                            </div>
                <?php else: ?>

                <?php echo $content; ?>
                <?php endif; ?>
                <div id="footer">
                    <p class="left"><a href="http://www.marialolaresto.com.ar/" target="_blank">MariaLolaResto.com.ar</a></p>
                    <p class="right">Desarrolado por Victor Nahuel Chaves.</p>
                </div>
            </div> <!-- wrapper ends -->




        </div><!-- page -->

    </body>
</html>